package top.zhangjianyong.tools.factory;

import org.springframework.web.multipart.MultipartFile;
import top.zhangjianyong.tools.entity.Torrent;

import java.io.File;

/**
 * @author ： zhangjianyong
 * @date ： 2023/3/22 2:58 PM
 */
public class TorrentFactory {

    public static Torrent create() {
        return new Torrent();
    }

    public static Torrent create(String magnet, String hash,
                                 String name, String path,String md5, String fileName) {
        Torrent torrent = create();
        torrent.setHash(hash);
        torrent.setMagnet(magnet);
        torrent.setName(name);
        torrent.setPath(path);
        torrent.setMd5(md5);
        torrent.setFileName(fileName);
        return torrent;
    }
}
